package com.dj.mingkong.admin.biz.repository.database.music;

import com.dj.mingkong.common.infrastructure.base.dto.query.QueryVo;
import com.dj.mingkong.common.infrastructure.base.repository.BaseDatabaseRepository;
import com.dj.mingkong.common.infrastructure.eo.database.music.MusicianStyleEo;
import com.dj.mingkong.admin.biz.repository.database.music.mapper.MusicianStyleMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 音乐人音乐风格repository
 *
 * @author zenglonghui
 * @date: 2023/2/15 15:45
 */
@Repository
public class MusicianStyleRepository extends BaseDatabaseRepository<MusicianStyleMapper, MusicianStyleEo, QueryVo> {
    public List<MusicianStyleEo> listByMusicianId(Long musicianId) {
        return lambdaQuery().eq(MusicianStyleEo::getMusicianId, musicianId).list();
    }

    public boolean deleteByMusicianId(Long musicianId) {
        return lambdaUpdate().eq(MusicianStyleEo::getMusicianId, musicianId).remove();
    }
}
